<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="box">
        <template>
            <ul>
                <home>
                    <li slot='s1' v-for='item in list'>{{item}}</li>
                    <div slot='s2'>我希望我在插槽2</div>
                    <div slot='s2'>我也希望我在插槽2</div>
                </home>
            </ul>
        </template>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        Vue.component('home', {
            template: `
            <div>
                <slot name='s1'></slot>
                插槽的使用
                <slot name='s2'></slot>
            </div>
            `
        })
        new Vue({
            el: '#box',
            data: {
                current: 'home',
                list: ['aa', 'bb', 'cc']
            }
        })
    </script>
</body>

</html>